<%@page import="com.exam.dao.PaperDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<jsp:include page="checkAdmin.jsp" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-2.0.js"></script>
<script type="text/javascript" src="js/select-ui.min.js"></script>

<script type="text/javascript">
$(document).ready(function(e){
 
 	 $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 180  
	});
	$(".select3").uedSelect({
		width : 100
	});
 
 
  var url = "#";
  $(".click").click(function(){
  		$(".tip").fadeIn(200);
  		url = this.href;
  		return false;
  });
  
  $(".tiptop a").click(function(){
 		 $(".tip").fadeOut(200);
	});

  $(".sure").click(function(){
  		$(".tip").fadeOut(100);
  		location.href = url;
	});

  $(".cancel").click(function(){
 		$(".tip").fadeOut(100);
	});
	
});
</script>
</head>

<body>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="index.jsp">首页</a></li>
    <li><a href="#">成绩管理</a></li>
    <li><a href="#">成绩列表</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    
    	<ul class="toolbar">
        <li><span><img src="images/t01.png" /></span>添加</li>
        <li><span><img src="images/t02.png" /></span>修改</li>
        <li><span><img src="images/t03.png" /></span>删除</li>
        </ul>
        
        
        <ul class="toolbar1">
        <li><span><img src="images/t05.png" /></span>设置</li>
        </ul>
    
    </div>
    <form action="grade-list.action">
    <ul class="seachform">
    <li><label>按学号查</label><input name="sid" type="text" class="scinput" /></li>
    <li>
    <label>选择试卷</label>  
    	<%
   			//获取题库列表
   			PaperDao p = new PaperDao();
   			request.setAttribute("AllPaper", p.getAllPaper());
   		 %>
   		 <div class="vocation">
	   		<select class="select2" name="pid">
	    	<s:iterator value="#request.AllPaper" status="paper">
	    			<option value="<s:property value="id"/>"><s:property value="paperName"/></option>
	    	</s:iterator>
		    
	  	  	</select>
	    </div>	
    </li>
    
    
    <li><label>&nbsp;</label><input  type="submit" class="scbtn" value="查询"/></li>
    </ul>
    </form>
     <table class="tablelist">
    	<thead>
    	<tr>
        <th>编号<i class="sort"><img src="images/px.gif" /></i></th>
        <th>学号</th>
        <th>姓名</th>
        <th>成绩</th>
        <th>所考试卷</th>
        <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <s:if test="#request.GradeList!=null">
        <s:iterator value="#request.GradeList" status="list">
        <tr>
		        <td><s:property value="id"/></td>
		        <td><s:property value="sid"/></td>
		        <td><s:property value="sname"/></td>
		        <td><s:property value="score"/></td>
		        <td><s:property value="pname"/></td>
		        <td>
		     		<a href="getErrorQuestions.action?gid=<s:property value="id"/>&sid=<s:property value="sid"/>&pname=<s:property value="pname"/>" class="tablelink" target="_blank">[错题分析]</a>  <a href="grade-delete.action?gid=<s:property value="id"/>" class="tablelink click">[删除成绩]</a>
		        </td>
        </tr> 
        </s:iterator>
        </s:if>
        <s:else>
        	<tr>
        		<td colspan="7">暂无本类数据...</td>
        	</tr>
        </s:else>
           
        </tbody>
    </table>
    
    <div class="pagin">
    	<div class="message">
    		${pageInfo }
    	</div>
        ${pageList }
    </div>
    
    
    <div class="tip">
    	<div class="tiptop"><span>提示信息</span><a></a></div>
        
      <div class="tipinfo">
        <span><img src="images/ticon.png" /></span>
        <div class="tipright">
        <p>是否确认对信息的修改 ？</p>
        <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
        </div>
        
        <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
        <input name="" type="button"  class="cancel" value="取消" />
        </div>
    
    </div>
    </div>

</body>
</html>
